<template>
  <div class="gotop-gocart">
    <div class="gotop">
      <i class="iconfont icon-huidaodingbu" @click="backTop"></i>
    </div>
    <div class="gocart">
      <i class="iconfont icon-qicheqianlian-" @click="goCart"></i>
    </div>
  </div>
</template>
<script>
export default {
  // props: ['prolist'],
  methods: {
    goCart () {
      this.$router.push('/cart')
    },
    backTop () {
      document.getElementById('content').scrollTop = 0
    }
  },
  filters: {
    free (val) {
      if (val === '0') {
        return '包邮'
      } else {
        return '邮费' + val + '元'
      }
    }
  }
}
</script>

<style lang="scss">
@import '@/lib/reset.scss';
.gotop-gocart {
  position: fixed;
  z-index: 10;
  width: auto;
  height: auto;
  background-color: transparent;
  right: .2rem;
  bottom: .8rem;
  .gocart {
    margin-top: 0.08rem;
  }
  .gotop,.gocart {
    width: 0.4rem;
    height: 0.4rem;
    background-color: #fff;
    border-radius: 50%;
    text-align: center;
    line-height: 0.4rem;
    border: 0.01rem solid #ccc;
    i {
      font-size: .22rem;
    }
  }
}
</style>
